package com.equipment.system.web.api;

import com.equipment.system.service.AreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

/**
 * ${DESCRIPTION}
 *
 * @author 杨凯
 * @create 2018-03-26 10:24
 **/
@Controller
@RequestMapping("/area")
public class AreaController {

	@Autowired
	private AreaService areaService;


	@GetMapping("/province")
	@ResponseBody
	public Map<String,Object> getProvinceList(){
		Map<String,Object> map = new HashMap<>();
		map.put("provinces",areaService.getProvinceList());
		return map;
	}

}
